#ifndef _SqList_H_
#define _SqList_H_

#include"Status.h"

#define INIT_SIZE	7
#define	INCREMENT	1	

typedef struct{
    int	*base;
    int length;
    int	listsize;
}SqList;

Status InitList(SqList *L);

Status DestroyList(SqList *L);

Status ClearList(SqList *L);

Status ListEmpty(SqList L);

int ListLength(SqList L);

Status GetElem(SqList L,int i,int *e);

int LocateElem(SqList L,int e,Status (*f)(int a,int b));

Status PriorElem(SqList L,int cur_e,int *pre_e);

Status NextElem(SqList L,int cur_e,int *next_e);

Status ListInsert(SqList *L,int i,int e);

Status ListDelete(SqList *L,int i,int *e);

Status ListTraverse(SqList L,void(*f)(int e));

Status PrintList(SqList L,char *name);
#endif /*_SqList_H_*/
